package java6681.single;

public class Village6681 {
    static int waterSum ;
    private String name;
    private int num;

    public Village6681() {
    }

    public Village6681(String name, int num) {
        this.name = name;
        this.num = num;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public static  int drinkWater (int drink) {
        if(waterSum >=  drink )
            waterSum -= drink ;
        return drink;
    }
    public static  int seeWater() {
        return waterSum;
    }

    @Override
    public String toString() {
        return name+","+num;
    }
}
